import 'package:flutter/material.dart';

// سودا مودېلى
class Sale {
  final String id;
  final String customerId;
  final String customerName;
  final DateTime date;
  final List<SaleItem> items;
  final double total;
  final String paymentMethod;
  final String status;
  final String? notes;

  Sale({
    required this.id,
    required this.customerId,
    required this.customerName,
    required this.date,
    required this.items,
    required this.total,
    required this.paymentMethod,
    required this.status,
    this.notes,
  });
}

// سودا تۈرى
class SaleItem {
  final String productId;
  final String productName;
  final double price;
  final int quantity;
  final String unit;
  final double total;

  SaleItem({
    required this.productId,
    required this.productName,
    required this.price,
    required this.quantity,
    required this.unit,
    required this.total,
  });
}

// مەھسۇلات مودېلى
class Product {
  final String id;
  final String name;
  final double price;
  final int stock;
  final String unit;
  final String category;

  Product({
    required this.id,
    required this.name,
    required this.price,
    required this.stock,
    required this.unit,
    required this.category,
  });
}

// خېرىدار مودېلى
class Customer {
  final String id;
  final String name;
  final String phone;
  final String address;

  Customer({
    required this.id,
    required this.name,
    required this.phone,
    required this.address,
  });
}
